package com.zkthink.ceres.common.enums;

import com.zkthink.exception.BizException;
import lombok.Getter;

/**
 * chenke
 * 20211110
 * 学历类型
 */
@Getter
public enum EducationTypeEnum {
    CZYX_EDUCATION(0, "初中以下"),
    CZ_EDUCATION(1, "初中"),
    ZZ_EDUCATION(2, "中专"),
    GZ_EDUCATION(3, "高中"),
    DZ_EDUCATION(4, "大专"),
    BK_EDUCATION(5, "本科"),
    SS_EDUCATION(6, "硕士"),
    BS_EDUCATION(7, "博士"),
    ;

    private int code;

    private String desc;

    EducationTypeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static EducationTypeEnum getDscByType(Integer type) {
        for (EducationTypeEnum p : values()) {
            if (p.getCode() == type.intValue()) {
                return p;
            }
        }
        throw new BizException("no support promotionPlan");
    }
}
